//
// Tables
// --------------------------------------------------

// Regular Tables
// -------------------------

.table { 
	margin: 0 0 @spacing; 
	position: relative; 
	.rounded(); 
	&.table-white { background: #fff; }
	&.table-invoice {
		thead > tr > th, tbody > tr > th, tfoot > tr > th, thead > tr > td, 
		tbody > tr > td, tfoot > tr > td {
			border-top: none;
		}
	}
}
.table>thead>tr>th, 
.table>tbody>tr>th, 
.table>tfoot>tr>th, 
.table>thead>tr>td, 
.table>tbody>tr>td, 
.table>tfoot>tr>td { 
	border-top-color: #efefef; 
	padding: 9px;
}
.table>thead>tr>th {
	border-bottom: 1px solid #efefef;
}
.table td.center, .table th.center { text-align: center; }
.table td.right, .table th.right { text-align: right; }

// Condensed
// -------------------------

.table-condensed { font-size: 10pt; }
.table-condensed th, .table-condensed td { padding: 4px 10px; }

// Borderless
// -------------------------

.table-borderless {
	th, td { border: none; }
}

// Striped
// -------------------------

.table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th { background-color: #fff; }
.table-striped tbody tr:nth-child(even) td, .table-striped tbody tr:nth-child(even) th { background-color: #f7f7f7; }

// Bordered
// -------------------------

.table-bordered { 
	border-color: #efefef; th, td { border-color: #efefef; }
	/* Reset rounded corners
	thead:first-child tr:first-child>th:first-child, 
	tbody:first-child tr:first-child>td:first-child, 
	tbody:first-child tr:first-child>th:first-child,
	thead:first-child tr:first-child>th:last-child, 
	tbody:first-child tr:first-child>td:last-child, 
	tbody:first-child tr:first-child>th:last-child,
	thead:last-child tr:last-child>th:first-child, 
	tbody:last-child tr:last-child>td:first-child, 
	tbody:last-child tr:last-child>th:first-child, 
	tfoot:last-child tr:last-child>td:first-child, 
	tfoot:last-child tr:last-child>th:first-child {
		.rounded();
	}
	*/
	.rounded(5px,5px,5px,5px);
}

// Utilities
// -------------------------

.table-fill td { background: #F8F8F8; }
.table .progress:last-child,
.table .alert:last-child { margin: 0; }
.table .shortRight { width: 25%; text-align: right; direction: rtl; text-indent: 10px; }
.table-large-spacing td { padding: 20px 15px; }
.table .thead td { padding: 8px; font-weight: bold; }
.table-vertical-center td,
.table-vertical-center th { vertical-align: middle !important; }

// table-thead-simple
// -------------------------

.table-thead-simple {
	thead {
		th {
			background: none;
			border-left: none;
			border-right: none;
			border-top: none;
			border-bottom: 1px solid #efefef;
			color: @bodyText;
			.rounded();
			text-shadow: none;
			text-transform: none;
			.bevelEmboss(0,0);
		}
	}
	&.table-thead-border-none {
		border-top: none;
		.rounded();
		thead {
			th {
				border-bottom: none;
			}
		}
		thead:first-child tr:first-child > th:last-child, 
		tbody:first-child tr:first-child > td:last-child, 
		tbody:first-child tr:first-child > th:last-child { .rounded(); }
	}
}

// Table Primary
// -------------------------

.table-primary {
	border-color: @contentBorder;
	border-top: none;
	thead 
	{
		th { 
			border-color: @primaryColor;
			background-color: @primaryColor;
			color: #fff;
			font-size: 14px;
		}
		&:first-child tr:first-child > th:first-child,
		&:first-child tr:first-child > th:last-child {  }
	}
	tbody td {
		color: @bodyText;
		background: @contentBg1;
		border-width: 0px; 
		&.important { color: @primaryColor; font-weight: 700; }
		&.actions { padding-right: 1px; }
	}
	&.table-bordered {
		tbody td {
			border-color: @contentBorder;
			border-width: 1px;
		}
	}
	tbody tr:nth-child(odd) td, 
	tbody tr:nth-child(odd) th {
		background: @widgetBg;
	}
	tbody tr.selectable td { cursor: pointer; }
	tbody tr.selected td,
	tbody tr.selectable:hover td {
		background: fade(@primaryColor, 10%);
	}
}